package cn.e4j.modular.system.service.impl;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.modular.system.entity.SysDic;
import cn.e4j.modular.system.mapper.SysDicMapper;
import cn.e4j.modular.system.service.SysDicService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 数据字典表 服务实现类
 * </p>
 *
 * @author yuhuan
 * @since 2018-12-19
 */
@Service
public class SysDicServiceImpl extends ServiceImpl<SysDicMapper, SysDic> implements SysDicService {

    @Transactional(readOnly = true)
    public List<Map<String, Object>> getDicList(Page<Object> page, Dto dto) {

        List<Map<String, Object>> dicDtos = this.baseMapper.getDicList(page, dto);

        return dicDtos;
    }

    @Override
    public SysDic getById(String ID) {
        return this.baseMapper.getById(ID);
    }

    @Override
    public List<SysDic> getListData(String IDCKEY) {
        return this.baseMapper.getListData(IDCKEY);
    }


}
